The present invention relates generally to rendering of pixels in a computer graphics system. More particularly, the present invention relates to faster rendering of pixels in a computer graphics system.
Computer graphics images are often drawn on a raster-scan display and have a two dimensional array of pixels. These pixels are used to sample and render a geometric mathematical model, which represents a virtual world created by a computer graphics modeler. This quantization process often creates problems or anomalies in the primitives or polygons that are processed. One problem is that visual artifacts are produced because the viewer""s ability to resolve the image often exceeds the resolution of the display. For example, the image may be displayed at 1024xc3x971280, which is a much lower resolution than the maximum resolution that the human eye is able to resolve.
The resulting visual problems are called aliasing, which includes undesirable results such as jagged edges, staircasing, flickering, scintillation and other problems. These aliasing effects are especially noticeable when a primitive object or polygon has a straight line or edge that does not align with the horizontal or vertical arrangement of the pixels. As can be imagined, objects in computer graphic images are not always horizontally or vertically aligned with the pixels. Techniques that reduce or eliminate these undesirable effects are referred to as antialiasing.
One method for reducing aliasing is called supersampling. This approach takes more than one sample for each pixel and combines them together to create the final pixel. Each supersample or subpixel typically includes a color-value (or grey-scale value) and a Z-value. The depth value or Z-value represents the relative depth of a sample in the scene and it is used to perform hidden surface removal.
Antialiasing is generally implemented with subpixel buffers that include 2, 4, 8, or 16 times as many subpixels as the pixel resolution image. Each pixel has a corresponding number of subpixels, such as 16 subpixels for each pixel. These subpixel buffers have often been implemented with dynamic random access memory (DRAM or SDRAM) or other more expensive types of high speed RAM.
In a system implemented with SDRAM or double data-rate (DDR) RAM, the graphics system performance is inversely proportional to the number of subpixels for each pixel. This is because the system performs calculations and memory accesses for each additional subpixel that is used. Thus, performance is decreased by a factor of 2, 4, 8, or 16 or more when supersampling anti-aliasing is employed. Higher speed RAM can be used to increase the performance of the system but this increases the cost of the graphics system.
The invention provides a device for improving pixel rendering performance in a computer graphics system. The device includes a pixel resolution buffer containing a plurality of pixel storage locations to store pixel values. A depth value is included for each pixel storage location in the pixel resolution buffer, to store a closest depth for polygons that cover the pixel. A subpixel resolution buffer is also included with at least two subpixels corresponding to each pixel storage location in the pixel resolution buffer.
In accordance with a more detailed aspect of the present invention, the system includes a a polygon coverage flag in the pixel resolution buffer for each pixel storage location, where the polygon coverage flag represents whether one or more polygons are associated with the pixel.
One embodiment of the invention includes a method for improving pixel rendering performance in a computer graphics generation system. The method includes the steps of receiving a polygon fragment from a geometry subsystem and determining whether a depth of the incoming polygon fragment is closer than a current depth of a current pixel. An additional step is determining whether a current pixel is completely covered or partially covered by the polygon fragment received. A further step is selecting whether to write the polygon fragment to a pixel resolution buffer or a subpixel resolution buffer based upon whether the current pixel is completely or partially covered by the polygon fragment. The method also includes the step of writing the polygon fragment to the pixel resolution buffer if the pixel is covered by the polygon fragment or a subpixel resolution buffer if the pixel fragment is partially covered by the polygon fragment.
Additional features and advantages of the invention will be apparent from the detailed description which follows, taken in conjunction with the accompanying drawings, which together illustrate, by way of example, features of the invention.